package com.mytijian.task.enums;


public enum  TaskTypeEnum {
    Batch_Order(0,"批量下单"),
    Batch_Import_Examiner(1,"批量导入体检人"),
    Batch_Order_Revoke(3,"批量撤单"),
    Batch_Test(-1, "批量测试"),
    ;
    private int code;
    private String desc;

    TaskTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static TaskTypeEnum getByCode(int code) {
        TaskTypeEnum[] taskTypeEnums = TaskTypeEnum.values();
        for (TaskTypeEnum taskTypeEnum : taskTypeEnums) {
            if (taskTypeEnum.code == code) {
                return taskTypeEnum;
            }
        }
        throw new IllegalArgumentException("没有找到taskType,code = " + code);
    }
}
